import request from '@/utils/request'

export function getRoles(params) {
  return request({
    url: '/sys/role',
    method: 'get',
    params
  })
}
export function delRoles(id) {
  return request({
    url: '/sys/role/' + id,
    method: 'delete'
  })
}
export function addRoles(data) {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}
export function updateRole(data) {
  return request({
    url: '/sys/role/' + data.id,
    method: 'PUT',
    data
  })
}
